Haar-like features along with AdaBoost (i.e., adaptive boosting) techniques are popular methods for object detection and classification in computer vision applications. For example, these techniques can be used in pedestrian detection, traffic sign recognition or any other kinds of object detection in ADAS applications. Haar-like features are calculated at a particular location of a digital image using weighted sum of image pixels for rectangular regions of the image. Weights are applied to the summed pixels for the particular regions of the Haar-like feature based on learned aspects from object detection and classification for similar features and similar images. Weights and feature are learned from training (e.g., AdaBoost training). FIGS. 1A-B show examples of Haar-like edge features. FIGS. 2A-B show examples of Haar-like line features. FIGS. 3A-B show examples of Haar-like center-surround features. The sum of the pixels under the dark area is weighted and compared to a weighted sum of the pixels under the lighter area. The resultant value is the feature cost at a reference for the area subject to the calculation.
Dense Haar-like feature calculations require the feature to be calculated at each pixel location in an image or areas of interest within the image by sliding the Haar-like feature by one pixel in raster order through the area. Typically, raster order refers to a left-to-right sequence along each row of the image or area and sequentially moving down from an uppermost row to a lowest row of the image or area.
A popular method to calculate pixel characteristics under a rectangular region is to calculate an integral image representation of the raw image and utilize pixel summations in the integral image instead of pixels of the raw image. Each element of an integral image may be 32 bit (one word) for normal use of application. In general, the performance and efficiency of Haar-like feature calculations are heavily influenced by processor data loads. For example, a Haar-like feature calculation may require data loads from non-aligned locations of a buffer storing the integral image because Haar feature size can be any suitable number of pixels (e.g., odd or even pixel dimensions). Align or non-align words are associated with an alignment boundary. In the current context, the alignment boundary is 64 bits (i.e., two words). Anything that is not at the boundary of 64 bits is not aligned.
A problem is that the data loads required in a Haar-like feature calculation may not utilize the maximum capability of the processor (e.g., C6000 Digital Signal Processor (DSP)), where non-aligned data reads are costlier than aligned data reads. This problem is amplified for dense Haar feature calculations that are performed on each pixel location of the image. This problem also exists when rotated Haar-like features are calculated.
FIGS. 4A-B show examples of rotated Haar-like edge features. FIGS. 5A-B show examples of rotated Haar-like line features. FIGS. 6A-B show examples of rotated Haar-like center-surround features. Rotated Haar-like features can be treated as an unrotated feature (target region) on a rotated image or as a rotated feature (target region) on an unrotated image. In either arrangement, the summation of the pixels must use a raster sequence based on the orientation of the target rectangular region.